package com.briup.smartcity.web.controller;

import com.briup.smartcity.aop.Logging;
import com.briup.smartcity.bean.BaseLog;
import com.briup.smartcity.bean.Carousel;
import com.briup.smartcity.service.IBaseLogService;
import com.briup.smartcity.service.ICarouselService;
import com.briup.smartcity.utils.Result;
import com.briup.smartcity.utils.ResultUtil;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "日志模块")
@RestController
@RequestMapping("/auth/log")
public class LoggingController {
    @Autowired
    private IBaseLogService service;
    @Logging()
    @ApiOperation("分页查找日志信息")
    @GetMapping("/pageQuery")
    public Result findAllLog(Integer pageNum, Integer pageSize){
        PageInfo<BaseLog> pageInfo = service.pageQuery(pageNum,pageSize);
        return ResultUtil.success(pageInfo);
        //return ResultUtil.success();
    }
}
